#!/usr/bin/env bash

rm -rf ${ORIGIN_DIR_NAME_01} ${ORIGIN_DIR_NAME_02} ${DIR_NAME_01} ${DIR_NAME_02} ${DIR_NAME_01_NEW_GIT_CLONE}

mkdir ${ORIGIN_DIR_NAME_01}
cd ${ORIGIN_DIR_NAME_01}
git init --bare

cd ..
mkdir ${ORIGIN_DIR_NAME_02}
cd ${ORIGIN_DIR_NAME_02}
git init --bare

cd ..
git clone ${ORIGIN_DIR_NAME_01} ${DIR_NAME_01}
git clone ${ORIGIN_DIR_NAME_02} ${DIR_NAME_02}

cd ${DIR_NAME_01}
git init
cp -f ../../111.txt 111.txt
git add 111.txt
git commit -m "add 111.txt"
git push

cd ..
cd ${DIR_NAME_02}
git init
cp -f ../../222.txt 222.txt
git add 222.txt
git commit -m "add 222.txt"
git push

cd ..
cd ${DIR_NAME_01}
git submodule add ../${ORIGIN_DIR_NAME_02} ${DIR_NAME_02}
git commit -m "exec submodule add"
git push
cd ..

